package com.mf.utils;

import com.mf.Enum.EnumWorkType;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: lmf
 * @Create: 2025/4/21 13:41
 * @module : 工单类型工具类
 */
public class UtilOperatorWorkType {
    private final static Map<String, Integer> operatorWorkTypeMap = new HashMap<>();
    static {
        EnumWorkType[] enumWorkTypes = EnumWorkType.values();
        for (EnumWorkType enumWorkType : enumWorkTypes) {
            operatorWorkTypeMap.put(enumWorkType.getMessage(), enumWorkType.getCode());
        }
    }

    public static Integer getOperatorWorkType(String operatorWorkType) {
        return operatorWorkTypeMap.get(operatorWorkType);
    }
}
